With the development of computer technologies, a computer system becomes more and more complex, and an existing computer system may include multiple modular nodes. In a multi-node computer system, design quality of a cache is an important factor affecting system performance. Through the cache, read and write speeds of data may be increased, so as to improve input/output (I/O) performance of the system.
A solid state disk (SSD), due to excellent read and write performance thereof, is used as a cache medium widely applied between a memory and a magnetic disk.
In an existing application, a set-associative mapping manner is adopted between an SSD cache and a magnetic disk. As show in FIG. 1, data of each magnetic disk area is cached in a corresponding SSD group (data of an area of a corresponding color is cached in a corresponding SSD area). When an application program needs to read data in a white area in a magnetic disk, whether the data is already cached in a white area of the SSD is retrieved first. In the prior art, some commonly used data is kept through an SSD cache, thereby decreasing the number of times of disk seek of a magnetic disk and increasing data read and write efficiency.
However, when an SSD cache is applied in a multi-node computer system, as shown in FIG. 1, it is assumed that four areas of different colors in the SSD cache represent nodes 1, 2, 3 and 4 respectively in sequence. According to a set-associative mapping manner between the SSD cache and a magnetic disk, data in a white area of the magnetic disk can only be cached in a cache area of the node 1. Even if the system identifies that the data in the white area of the magnetic disk has affinity with the node 2, the data cannot be cached in a cache area of the node 2, thereby increasing overheads of remote access of the system, and reducing cache efficiency.